<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>JImageUpload Documentation - FAQ</title>
<link href="styles/template.css" rel="stylesheet" type="text/css" />
<link href="styles/doc.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
#faq .sectionTitle a {
	color: #FFFFFF;
	text-decoration: none;
}
#faq .sectionTitle a:hover {
	color: #FFFFFF;
	text-decoration: underline;
}
#faq a {
	color: #000000;
	text-decoration: none;
}
#faq a:hover {
	color: #000000;
	text-decoration: underline;
}

#faq ul {
	font-size: 10px;
	padding: 0px;
	list-style:inside ;
	margin: 1px;
}
#faq tr td {
	vertical-align: top;
}
-->
</style>
</head>
<body>
<div id="containerDiv">
  <div id="topDiv">
  <div id="navDiv">
  <div id="tabsDiv"><ul>
  <li><a href="http://www.jfileupload.com/index.html" title="Home"><span>Home</span></a></li>
  <li><a href="http://www.jfileupload.com/products/index.html" title="Products"><span>Products</span></a></li>
  <li><a href="http://www.jfileupload.com/support/index.html" title="Support"><span>Support</span></a></li>
  <li><a href="http://www.jfileupload.com/purchase/index.html" title="Purchase"><span>Purchase</span></a></li>
  <li><a href="http://www.jfileupload.com/about/index.html" title="About"><span>About</span></a></li>
  </ul></div>
  <div id="searchDiv"></div>
  </div>
  </div>
  <div id="mainDiv">
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="20%" valign="top"><div id="sidebar">
      <div id="sidebarSection">
        <ul>
          <li><img src="styles/bullet.gif" width="7" height="13" border="0" /><a href="installation.html" title="Installation"><span>Installation</span></a></li>
          <li><img src="styles/bullet.gif" width="7" height="13" border="0" /><a href="configuration.html" title="Configuration"><span>Configuration</span></a></li>
          <li><img src="styles/bullet.gif" width="7" height="13" border="0" /><a href="faq.html" title="FAQ"><span>FAQ</span></a></li>
          </ul>
      </div>
      <div id="sidebarNav"><br/><br/><a href="index.html" title="Back">&lt;&lt; Back</a></div>
      </div>    </td>
    <td width="80%" valign="top"><table width="98%" border="0" cellspacing="1" cellpadding="0" align="center">
      <tr>
        <td valign="top"><p align="center" class="mainTitle"><b>- FAQ -</b><div id="faq">
            <table width="100%" border="0" cellspacing="2">
              <tr>
                <td width="50%" class="sectionTitle"><a href="#1">Basic setup (4)</a></td>
                <td width="50%" class="sectionTitle"><a href="#5">Advanced setup (5)</a></td>
              </tr>
              <tr>
                <td width="50%" class="faq"><ul>
                  <li><a href="#1">How to setup JImageUpload ?</a></li>
                  <li><a href="#2">JImageUpload fails to load (gray box) ?</a></li>
                  <li><a href="#3">How to modify JImageUpload thumbnails properties (size, ...) ?</a></li>
                  <li><a href="#4">How to internationalize JImageUpload resources (messages,
                      errors , ...)</a> ?</li>
                </ul></td>
                <td width="50%"><ul><li><a href="#5">How to allow both images and non-images upload ?</a></li>
                  <li><a href="#9">How to limit amount of images to upload ?</a></li>
                  <li><a href="#10">How to enable file menu ?</a></li>
                  <li><a href="#11">How to setup JImageUpload to recurse folders and subfolders to load images</a> ?</li>
                  <li><a href="#12">How to setup JImageUpload to create folders structure  when recursing</a> ?</li>
                </ul></td>
              </tr>
              <tr>
                <td width="50%" class="sectionTitle"><a href="#6">Scale and rotate support (2)</a></td>
                <td width="50%" class="sectionTitle"><a href="#8">Others (1)</a><a href="#14"></a></td>
              </tr>
              <tr>
                <td width="50%"><ul>
                  <li><a href="#6">Can I chain JImageFilter  to JImageUpload ?</a></li>
                  <li><a href="#7">How to enable rotation feature ?</a></li>
                  </ul></td>
                <td width="50%"><ul>
                  <li><a href="#8">Can I use JImageUpload Pro with JFileUpload Enterprise ?</a></li>
                  </ul></td>
              </tr>
            </table>
        </div>
            <table width="100%" border="0" cellspacing="1" cellpadding="1">
              <tr>
                <td><div align="center"><hr size="2" noshade="noshade" />
                </div></td>
              </tr>
              <tr>
                <td ><table width="100%" border="0" cellspacing="1" cellpadding="1">
                  <tr>
                    <td class="sectionTitle">Basic setup</td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td><ul>
                    <li><a name="1" id="1"></a><b>How to setup JImageUpload ?<br />
                      </b>JImageUpload  includes two sample files : <br />
                      For FTP : applet_ftp_ipreview.html + applet_ftp_ipreview.js<br />
                      for HTTP : applet_http_ipreview.html + applet_http_ipreview.js. <br />
                      Edit and modify parameters in the file matching to your need.</li>
                    <li><a name="2" id="2"></a><b>JImageUpload  fails to load (gray box) ?</b><br />
                        You must install  JFileUpload first. Then you have to follow installation instructions above (copy  previewui.jar under lib/ folder ...).</li>
                    <li><a name="3" id="3"></a><b>How to modify JImageUpload thumbnails properties (size, ...) ?</b><br />
Edit i18n_pane.properties and update resources as you need. For thumbnails size:<br />
&nbsp;&nbsp;preview.image.width=128<br />
&nbsp;&nbsp;preview.image.height=96<br />
Thumbnails are displayed in a table. You can select table layout with:<br />
&nbsp;&nbsp;preview.grid.columns=5<br />
&nbsp;&nbsp;preview.grid.rows=20 </li>
                    <li><a name="4" id="4"></a><b>How to internationalize JImageUpload resources (messages,
                      errors , ...) ?<br />
                    </b>In the same way as you can internationalize JFileUpload resources through i18n_bar.properties and i18n_pane.properties.</li>
                </ul>
                  <table width="100%" border="0" cellspacing="1" cellpadding="1">
                    <tr>
                      <td class="sectionTitle">Advanced setup</td>
                    </tr>
                  </table>
                  <ul><li><a name="5" id="5"></a><b>How to allow both images and non-images upload  ?<br />
                    </b>Comment preview.image.extensions property in i18n_pane.properties. If you want JImageUpload to display &quot;No preview available&quot; for non-image files then uncomment preview.image.nopreview property.</li>
                    <li><a name="9" id="9"></a><b>How to limit amount of images to upload ?<br />
                    </b>Default limit is  preview.grid.columns x preview.grid.rows. For instance, if preview.grid.columns=20 and preview.grid.rows=5 then maximum amount of images is 100. If need to setup it to 99 then use maxfiles parameter from JFileUpload:<br />
                    &lt;PARAM NAME=&quot;maxfiles&quot; VALUE=&quot;99&quot;&gt;</li>
                    <li><a name="10" id="10"></a><b>How to enable file menu ?<br />
                    </b>You enable file menu with file chooser through:<br />
&lt;PARAM NAME=&quot;hidebar&quot; VALUE=&quot;false&quot;&gt;</li>
                    <li><a name="11" id="11"></a><b>How to setup JImageUpload to recurse folders and subfolders to load images ?<br />
                    </b>Same as JFileUpload, enable folderdepth:<br />
&lt;PARAM NAME=&quot;folderdepth&quot; VALUE=&quot;-1&quot;&gt;</li>
                    <li><a name="12" id="12"></a><b>How to setup JImageUpload to create folders structure  when recursing ?</b><br />
                      As for JFileUpload, you need to enable folderdepth parameter and relativefilename extra parameter. It will recreate folders structure on server-side. However, you need to setup policy=ignore too:<br />
                      &lt;PARAM NAME=&quot;folderdepth&quot; VALUE=&quot;-1&quot;&gt;<br />
  &lt;PARAM NAME=&quot;param4&quot; VALUE=&quot;relativefilename&quot;&gt;<br />
  &lt;PARAM NAME=&quot;value4&quot; VALUE=&quot;true&quot;&gt;<br />
  &lt;PARAM NAME=&quot;policy&quot; VALUE=&quot;ignore&quot;&gt;<br />
                      Also, if you plan to use rotation feature or chain JImageFilter to JImageUpload   then you do need to setup:<br />
                      &lt;PARAM NAME=&quot;filterparam1&quot; VALUE=&quot;tmpfolder&quot;&gt;<br />
&lt;PARAM NAME=&quot;filtervalue1&quot; VALUE=&quot;auto&quot;&gt;<br />
                    It will create temporary images in the same folders as original images (instead of user's temporary folder) and then it allows to keep folders structure.</li>
                  </ul>
                  <table width="100%" border="0" cellspacing="1" cellpadding="1">
                                          <tr>
                                            <td class="sectionTitle">Scale and rotate support</td>
                                          </tr>
                      </table>
                  <ul>
                    <li><a name="6" id="6"></a><b>Can I chain JImageFilter to JImageUpload ?</b><br />
                      Yes, here are instructions to integrate it: <br />
                      1 - Install JImageUpload with JFileUpload.<br />
                      2 - Copy scaling.properties into the same folder as others .properties files.<br />
                      3 - Copy ifilter.jar into lib/ folder with others JAR files.<br />
                      4 - Append ,lib/ifilter.jar to all ARCHIVE parameters in JImageUpload JavaScript.<br />
                      5 - Enable JImageFilter in JImageUpload JavaScript:<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;PARAM NAME=&quot;filter&quot; VALUE=&quot;jfileupload.upload.client.filter.ImageFilter&quot;&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;PARAM NAME=&quot;filterproperties&quot; VALUE=&quot;scaling.properties&quot;&gt;</li>
                    <li><a name="7" id="7"></a><b>How to enable rotation feature ?<br />
                      </b>Images could be rotated before upload. To enable it you need to install JImageFilter (follow instructions of previous question above except step 5). Uncomment the following properties in i18n_pane.properties:<br />
                      preview.image.rotation.impl=jfileupload.upload.client.filter.ImageFilter<br />
                      preview.image.rotateicon=jfileupload/transfer/client/preview/rotate.png<br />
                      preview.upload.rotation.started=Image rotation started ({0}), please wait ...<br />
                      preview.upload.rotation.completed=Image rotation completed ({0})<br />
                      preview.upload.rotation.failed=Image rotation failed: {0}<br />
                    </li>
                    </ul>
                  <table width="100%" border="0" cellspacing="1" cellpadding="1">
                    <tr>
                      <td class="sectionTitle">Others</td>
                    </tr>
                  </table>
                  <ul>
                        <li><a name="8" id="8"></a><b>Can I use JImageUpload Pro with JFileUpload Enterprise ? </b><br />
No, JImageUpload Pro works with JFileUpload Pro only. JImageUpload Enterprise requires  JFileUpload Enterprise or Premium.<br />
                        <br />
                  </li>
                      </ul>                  </td>
              </tr>
            </table>            </td>
      </tr>
    </table></td>
  </tr>
  </table>
  </div>
  <div id="bottomDiv">
    <p><a href="http://java.sun.com" target="_blank">Java</a> and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries. <br />
    All other company and/or product names are the property of their respective owners.</p>
  </div>
</div>
</body>
</html>
